Page({
    data:{
        title:"未完成的歌",
        time:"2009-12-11",
        singer:"薛之谦",
        url:"http://p2.music.126.net/iSfHsgwCPXyvIC-9b3Oytw==/109951165625500222.jpg?param=177y177",
        list:[
            {
                id:169152,
                videoSrc:"http://link.hhtjim.com/163/169152.mp3",
                songname:"未完成的歌",
                name:"薛之谦",
            },
            {
                id:169156,
                videoSrc:"http://link.hhtjim.com/163/169156.mp3",
                songname:"我的雅典娜",
                name:"薛之谦",
            },
            {
                id:169159,
                videoSrc:"http://link.hhtjim.com/163/169159.mp3",
                songname:"传说",
                name:"薛之谦",
            },
            {
                id:169162,
                videoSrc:"http://link.hhtjim.com/163/169162.mp3",
                songname:"马戏小丑",
                name:"薛之谦 / 罗开元",
            },
            {
                id:169165,
                videoSrc:"http://link.hhtjim.com/163/169165.mp3",
                songname:"你过得好吗",
                name:"薛之谦",
            },
            {
                id:169168,
                videoSrc:"http://link.hhtjim.com/163/169168.mp3",
                songname:"红尘女子",
                name:"薛之谦",
            },
            {
                id:169171,
                videoSrc:"http://link.hhtjim.com/163/169171.mp3",
                songname:"Memory",
                name:"",
            },
            {
                id:169174,
                videoSrc:"http://link.hhtjim.com/163/169174.mp3",
                songname:"倾城",
                name:"薛之谦",
            },
            {
                id:169176,
                videoSrc:"http://link.hhtjim.com/163/169176.mp3",
                songname:"我们的世界",
                name:"薛之谦",
            },
            {
                id:169178,
                videoSrc:"http://link.hhtjim.com/163/169178.mp3",
                songname:"给我的爱人",
                name:"薛之谦",
            },
            {
                id:169180,
                videoSrc:"http://link.hhtjim.com/163/169180.mp3",
                songname:"爱的期限",
                name:"薛之谦",
            },
            {
                id:169183,
                videoSrc:"http://link.hhtjim.com/163/169183.mp3",
                songname:"黄色枫叶",
                name:"薛之谦",
            },
            {
                id:169185,
                videoSrc:"http://link.hhtjim.com/163/169185.mp3",
                songname:"认真的雪",
                name:"薛之谦",
            },
            {
                id:169188,
                videoSrc:"http://link.hhtjim.com/163/169188.mp3",
                songname:"爱我的人 谢谢你",
                name:"薛之谦",
            }
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})